import request from '@/utils/request'

export const login = data => {
  return request({
    url: '/app/v1_0/authorizations',
    method: 'post',
    data
  })
}

export const sendSms = data => {
  return request({
    url: `/app/v1_0/sms/codes/${data}`,
    method: 'get'
  })
}

export const getUserInfo = () => {
  return request({
    url: `/app/v1_0/user/profile`,
    method: 'get'
  })
}

export const getChannels = () => {
  return request({
    url: `/app/v1_0/user/channels`,
    method: 'get'
  })
}

export const getArticles = (data) => {
  return request({
    url: `/app/v1_1/articles`,
    method: 'get',
    params: data
  })
}
